import axios from "axios";

export const getFn = (url, params) => {
    const baseUrl = import.meta.env.VITE_BASE_URL + url;
    return new Promise((resolve, reject) => {
        axios.get(baseUrl, {
            params: params
        }).then((response) => {
            resolve(response.data);
        }).catch(err => {
            reject(err);
        })
    })
}
